Skip to content

perf(agc): reuse heap mirror reference buffers between builds - #8874

Merged
oneandonlydean merged 10 commits into
boykopovar:mainfrom
JJenkx:perf/agc-heap-reference-reuse
Nov 2, 2026
Merged

oneandonlydean merged 10 commits into
boykopovar:mainfrom
JJenkx:perf/agc-heap-reference-reuse

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Reuse heap-mirror write-back reference buffers instead of allocating fresh storage for every build. ReferenceStorage keeps at most eight idle buffers and 2 GiB, and a take selects the smallest capacity that fits. The reference is resized to the served range before reading resident-mirror bytes; the bytes copied and compared remain unchanged. Take/return allocate no storage and are noexcept; evicted buffers are destroyed after releasing the store lock.

Buffers idle for two seconds are released when the store is polled by take, an eligible return, a heap-mirror sweep or present. This is polled expiry, not a background timer: if none of those operations occurs, expired buffers remain until a later poll or process shutdown. The cap covers idle storage, not active references. The cap and reuse interval remain unmeasured policy choices recorded as debt.

The rebase preserves current main's joined-heap cleanup, resident-mirror growth/readback path, heap-readback clearing and address-copy cap tests. It retains the reviewed pool implementation and tests; the additional documentation commit clarifies the polling limitation.

Tested

Current rebase qualification (2026-10-28)

@oneandonlydean Refreshed on main 2227f1366188cda5699dd20e2e756a18006a5d4b as f31fdef05ba8bf532e19c461e2f758e860aa5fe9, retaining RunAddressCopyCapTests(int frames), adding RunHeapMirrorReferenceSizeTests, and keeping both debt entries. Original topic code/tests and current main gitlinks are preserved.

Linux Release with bundled SPIRV-Tools enabled: main's 16 groups ×3 pass (48), candidate's 18 groups ×3 pass (54), and the restored candidate passes 54 with source and driver byte-identical to its initial build. The main-production GuestBufferMemory.cpp control also passes all 18 groups: this is a compatibility control, not a distinguishing regression for the reuse optimization.

Four groups execute physical RX 6650 XT/RADV Vulkan: host-import unmap, host-import retirement, sparse-run import and sparse-run copied import. Their logs verify Khronos validation insertion (12 per repeated arm; 4 in the single control), zero VUIDs, missing-layer diagnostics or skips. The remaining fixtures use CPU/mock Vulkan, including the new reference-size fixture; their passes are not hardware coverage. An initial all-tests-passing harness attempt was excluded because it incorrectly required real-loader insertion from mock fixtures; it is preserved, and the corrected matched pair is archived.

Complete harnesses and cleanup used the shared FIFO and service-owned PTYs. Conventions and whitespace pass. Ready status is retained. Earlier measured memory/performance results retain their original pins; no new title, Windows, full-suite or speed claim is made.

Exact source/dependency pins, source proof, builds, service/FIFO receipts, controls, logs and JUnit, SHA-256 60998673f17454df73307175ec04830d347894b5a463e00fddd1447d552c781f.

Windows qualification, 2026-10-26: exact public head f7aec2a96626947a8f98dccca567e220d1030039 against pinned main 49d1f9b07ec7f6f989ace1c504bbe9dd6748dcbb, built separately with WinLibs GCC 15.2.0 UCRT r7, Release, Windows 11 Enterprise 10.0.22621, AMD Radeon RX 6700 XT, driver 32.0.21045.16010. This verifies the Windows test-runtime PATH fix: agc_reference_storage and agc_heap_mirror_reference_size each pass three times, and generated CTest metadata prepends the private libs/unpatched directory.

Main passes 16 executed groups × 3 (48 passes); the PR passes 18 × 3 (54 passes). Each selection additionally reports the same single expected skip, agc_host_import_sparse (Linux-only udmabuf imports). agc_heap_mirror_unwatched_import is not registered on Windows. No other skips or failures. Four physical GPU groups per arm each execute three times on the RX 6700 XT with Khronos validation loaded (12 insertions per arm); other selected groups use CPU/mock graphics. Zero VUIDs in either arm and no new VUIDs. Vulkan is required and shader caches disabled.

Both arms use the same private Khronos validation layer 1.4.309, source 3ba0e590a2e76475b3eef4043355b498fb64e752, built with the supported r7 toolchain. Initial attempts with an installed 1.4.363 layer failed to load because its libstdc++ imports were incompatible with r7; those runs are retained as rejected evidence. The final runs verify actual layer loading for every physical GPU repetition.

Exact pins, source manifests, build/test logs, JUnit, CTest runtime metadata, VVL/runtime hashes, rejected-attempt diagnostics and terminal FIFO receipts. SHA-256: 4dc1fd9f52de1e1c4dc25b4bb96e29af74b48700ca34c1a89c8f3546457fcef7; downloaded copy verified. No new title, RSS or performance measurement is claimed.

Current-main refresh, 2026-10-25: head cab138246ad9984df92e6c7427118c2b3cac4fd7, five linear commits on main 49d1f9b07ec7f6f989ace1c504bbe9dd6748dcbb. The four implementation/test commits are rebased, followed by a documentation-only expiry clarification. Production patch lines are unchanged from old public head d3e9e8a780c. Main's joined-heap expiry, resident growth/readback behavior and address-copy cap tests are retained. Source, conventions, whitespace and local merge-tree checks pass.

Linux GCC 16.2.1 Release, Ryzen 9 7950X, RX 6650 XT/RADV Mesa 26.2.4, Arch Linux 7.2.9. Built full libs on both pinned main and candidate, plus main's four/candidate's five selected test executables. Main passes 18 groups × 3 repetitions (54 passes); candidate passes 20 × 3 (60 passes). Zero skips and zero VUID errors. Vulkan is required and shader caches disabled. All four real GPU groups load Khronos validation in each physical repetition (12 insertions per arm); other groups use CPU/mock graphics checks, not physical GPU execution. The matrix includes pool/reference size, heap mirrors, sparse/import lifetimes and current-main address-copy caps.

A negative control delays only ReleaseIdle's clock by the idle interval. agc_reference_storage fails at a buffer idle for the limit was not released. After removing that temporary fault, the full candidate selection passes 60/60 again, zero skips/VUIDs, and the raw driver plus all five tested executable hashes are byte-identical to the first candidate. This verifies the test catches the expiry boundary; it is not a new title RSS observation or proof of a background timer.

Current source patch, preservation checks, full build logs, verbose main/candidate/control/restoration logs and hashes. SHA-256: de1b6160e76668c554c0738012a48121a51909c809ca104d3a8d714996fe1271; downloaded copy verified.

That Linux refresh included no fresh title, RSS, performance, Windows or full-suite run; the later Windows qualification is recorded above. Historical speed/RSS measurements below retain their original exact integration pins. The prior RSS scene kept using heap mirrors and did not exercise idle release; no measured release-induced RSS drop is established. The current description/debt explicitly correct the earlier implication of unconditional two-second expiry: release requires a subsequent poll.

Historical performance, RSS and earlier correctness evidence

  • Earlier tested head 082f3eceb9 (2906f2ac44 change + 082f3eceb9 test) on main 990f45e17d, prepared and gated by another AI worker on this machine (claude-research) and pushed here. Main had merged fix(agc): bind heap mirrors only where the guest holds bytes #7647 (resident heap mirrors), and the rebase keeps its semantics:
    • takeHeapReferences calls growResident, then takes reusable storage.
    • A resident mirror's bytes are read into that storage with resident->Read; otherwise they are assigned from the buffer.
    • heapReadbacks is still cleared where main clears it.
    • Both new tests are kept beside main's new agc_sparse_heap_mirror_budget.
    • It merged cleanly into the main revision tested in that earlier report.
  • Focused gate on that exact head: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest -V -j1 -R '^(agc_driver_graphics|agc_sparse_.*|agc_heap_mirror_.*|agc_host_import.*|agc_reference_storage)$'. Result: 18/18 pass, validation layer 1.4.363 inserted in 4 tests, 0 VUIDs.
    • On the previous head (404aab2817 on 9af7d8d810), main passed 15/15 and this PR 17/17, both with 4 layer insertions and 0 VUIDs. The new tests also pass with GuestBufferMemory taken from main. That is expected: reuse changes no observable bytes, and the tests check that reused storage is correct (sizes and contents), not that reuse happens.
    • Logs: https://github.com/JJenkx/AnyPS5/releases/tag/pr8874-evidence
  • Performance: controlled Code Violet (PPSA26528) run by another AI worker on this machine (claude-research). Details: perf(agc): reuse heap mirror reference buffers between builds #8874 (comment)
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 156, "ms": 30640.15}, "presents": 10, "frame_ms": {"p50": 3992.296, "p90": 5427.294, "p99": 5427.294, "max": 5427.294}, "gpu_busy_ms_per_present": 744.568, "worker_busy_pct": {"queue worker 0x0": 99.936, "queue worker 0x20": 98.571}, "top_phases_ms_per_frame": {"Driver.Packet": 6081.167, "Driver.Packet.dispatch": 3315.598, "Driver.Dispatch": 3314.242, "Vulkan.Dispatch": 2437.039, "Vulkan.Dispatch.shader_resources": 2427.172, "Resources.Complete": 2421.096, "Driver.Packet.memory_wait": 1878.356, "GpuMutex.wait.hook": 1015.725}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-2886059.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 181, "ms": 30888.713}, "presents": 15, "frame_ms": {"p50": 1757.209, "p90": 2984.839, "p99": 3937.0, "max": 3937.0}, "gpu_busy_ms_per_present": 682.819, "worker_busy_pct": {"queue worker 0x0": 99.922, "queue worker 0x20": 99.501}, "top_phases_ms_per_frame": {"Driver.Packet": 4106.071, "Driver.Packet.dispatch": 2124.983, "Driver.Dispatch": 2121.846, "Vulkan.Dispatch": 1540.429, "Vulkan.Dispatch.shader_resources": 1532.391, "Resources.Complete": 1529.579, "Driver.Packet.memory_wait": 1302.325, "GpuMutex.wait.hook": 654.578}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3013032.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 186, "ms": 31288.173}, "presents": 17, "frame_ms": {"p50": 1900.036, "p90": 2236.123, "p99": 2340.754, "max": 2340.754}, "gpu_busy_ms_per_present": 674.571, "worker_busy_pct": {"queue worker 0x0": 99.905, "queue worker 0x20": 98.584}, "top_phases_ms_per_frame": {"Driver.Packet": 3651.607, "Driver.Packet.dispatch": 1825.097, "Driver.Dispatch": 1824.09, "Vulkan.Dispatch": 1312.238, "Vulkan.Dispatch.shader_resources": 1303.662, "Resources.Complete": 1286.777, "Driver.Packet.memory_wait": 1254.13, "GpuMutex.wait.hook": 680.343}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3133785.json.gz"}
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 161, "ms": 34131.142}, "presents": 11, "frame_ms": {"p50": 2962.007, "p90": 4727.645, "p99": 5025.638, "max": 5025.638}, "gpu_busy_ms_per_present": 656.36, "worker_busy_pct": {"queue worker 0x0": 99.943, "queue worker 0x20": 99.06}, "top_phases_ms_per_frame": {"Driver.Packet": 6174.132, "Driver.Packet.dispatch": 3751.391, "Driver.Dispatch": 3750.419, "Vulkan.Dispatch": 2526.365, "Vulkan.Dispatch.shader_resources": 2517.92, "Resources.Complete": 2509.58, "Driver.Packet.memory_wait": 1551.969, "GpuMutex.wait.dispatch": 997.572}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-3247948.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 179, "ms": 30629.534}, "presents": 12, "frame_ms": {"p50": 2407.655, "p90": 3490.165, "p99": 4600.331, "max": 4600.331}, "gpu_busy_ms_per_present": 684.304, "worker_busy_pct": {"queue worker 0x0": 99.934, "queue worker 0x20": 99.217}, "top_phases_ms_per_frame": {"Driver.Packet": 5081.035, "Driver.Packet.dispatch": 2921.691, "Driver.Dispatch": 2920.738, "Vulkan.Dispatch": 2002.647, "Vulkan.Dispatch.shader_resources": 1994.514, "Resources.Complete": 1988.964, "Driver.Packet.memory_wait": 1505.24, "GpuMutex.wait.hook": 722.85}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3364695.json.gz"}
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 154, "ms": 31370.837}, "presents": 12, "frame_ms": {"p50": 3309.874, "p90": 4205.095, "p99": 4248.044, "max": 4248.044}, "gpu_busy_ms_per_present": 631.648, "worker_busy_pct": {"queue worker 0x0": 99.935, "queue worker 0x20": 98.603}, "top_phases_ms_per_frame": {"Driver.Packet": 5189.17, "Driver.Packet.dispatch": 3007.904, "Driver.Dispatch": 3006.72, "Vulkan.Dispatch": 2084.577, "Vulkan.Dispatch.shader_resources": 2075.89, "Resources.Complete": 2042.26, "Driver.Packet.memory_wait": 1379.514, "GpuMutex.wait.hook": 804.84}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-3481320.json.gz"}
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 159, "ms": 30481.98}, "presents": 11, "frame_ms": {"p50": 2036.421, "p90": 4246.281, "p99": 4663.05, "max": 4663.05}, "gpu_busy_ms_per_present": 810.726, "worker_busy_pct": {"queue worker 0x0": 99.94, "queue worker 0x20": 98.922}, "top_phases_ms_per_frame": {"Driver.Packet": 5510.018, "Driver.Packet.dispatch": 3208.028, "Driver.Dispatch": 3206.827, "Vulkan.Dispatch": 2244.751, "Vulkan.Dispatch.shader_resources": 2236.138, "Resources.Complete": 2217.781, "Driver.Packet.memory_wait": 1452.236, "GpuMutex.wait.hook": 829.56}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-3599341.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 178, "ms": 32057.776}, "presents": 15, "frame_ms": {"p50": 2021.931, "p90": 2604.798, "p99": 4700.152, "max": 4700.152}, "gpu_busy_ms_per_present": 718.208, "worker_busy_pct": {"queue worker 0x0": 99.923, "queue worker 0x20": 98.767}, "top_phases_ms_per_frame": {"Driver.Packet": 4245.321, "Driver.Packet.dispatch": 2323.912, "Driver.Dispatch": 2322.844, "Vulkan.Dispatch": 1614.889, "Vulkan.Dispatch.shader_resources": 1607.154, "Resources.Complete": 1582.581, "Driver.Packet.memory_wait": 1307.953, "GpuMutex.wait.hook": 696.814}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3716801.json.gz"}
  • Earlier observations, kept for the record (not controlled evidence):

    • Base main 9f4ddf7; this branch has the change cc53b45601 and a test commit 317d528af7.
    • New agc_reference_storage (CPU): empty store, reuse of the same allocation, smallest fit, eviction of the oldest by byte limit and by slot count (checked against the identities of the retained buffers), oversize storage, and Return/eviction/Take with the allocation-failure countdown armed (still armed afterwards, byte count consistent). A store whose eviction allocates terminates the test with std::bad_alloc.
    • ctest -R 'heap_mirror|sparse_heap|reference_storage|bda|guest_memory_lifetime|sparse' -V on main and on this PR, same machine and GPU, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layer 1.4.363 loaded; neither log reports was not found but was requested): main (9f4ddf7) 28/29, PR (cc53b45601) 29/30 (the extra test is the new one). Both fail agc_driver_guest_memory_lifetime the same way (radv/amdgpu: The CS has been rejected (-14), guest prefix unmap failed), and both logs hold the same validation errors: 2 × VUID-vkCmdCopyBuffer-srcBuffer-00118, 2 × VUID-vkResetFences-pFences-01123. No new VUID-.
    • Diagnostic observations, not controlled performance evidence. Integration build, not unmodified main: Echoes of the End PPSA25636 01.012.000 stops after about 30 s on main, so both sides are main 33a6d6b + fix(shader): preserve read lane dominance across branches #8089 + fix(agc): prefer imported prefixes before sparse heap mirrors #8762 + fix(agc): pin the import ceiling only on memory exhaustion #8091 + feat(libSceAgcDriver): import scattered direct memory as a dma-buf run list and probe its coherence #4449, without and with this commit. Unattended start to the loading screen, no input, one runtime directory for every run: the shader and pipeline cache directory is shared, so initial cache contents are not matched between runs, and no speedup is claimed from these lines. Ryzen 9 7950X, RX 6650 XT, RADV Mesa 26.2.4, Linux 7.2.9. Order base, PR, PR, base:

    Before (integration 8a251ef745):
    seconds 40:60 from present 340: 11 presents, frame p50 5867.4 / p90 7221.6 / p99 7377.7 / max 7377.7 ms, GPU busy 543.2 ms per present
    seconds 40:60 from present 351: 11 presents, frame p50 5427.9 / p90 6189.5 / p99 7141.4 / max 7141.4 ms, GPU busy 497.8 ms per present

    After (integration + this PR, 6e0a219cbe):
    seconds 40:60 from present 343: 15 presents, frame p50 4069.4 / p90 5171.4 / p99 5460.5 / max 5460.5 ms, GPU busy 497.8 ms per present
    seconds 40:60 from present 348: 16 presents, frame p50 4004.1 / p90 4933.0 / p99 5394.2 / max 5394.2 ms, GPU busy 479.7 ms per present

    The title still loads at well under 1 FPS on both sides. The captures ran on an integration with the earlier base 33a6d6bbfb; the PR commit was cherry-picked onto it (6e0a219cbe). Traces, logs, screenshots, profiles and validation logs: evidence archive (SHA-256 00bbfd328cc0ecbed29aedd3925217dc6e39a9a018170bd941549b5146af27be).

    • Second title, neutral observation, no improvement claimed: Mortal Shell II PPSA34008, measured by another worker on the same machine and scene, APS5_TRACE_SECONDS=150:30, one run each, separate relinked runtimes, initial shader/pipeline cache state not reported as matched. Base main e0e57a3270 + fix(libSceVideodec2): answer the generic picture query for VP9 pictures #8839 (641fce5c84), change = base + this PR (91d0f400ba):

    Before: seconds 150:30 from present 26: 6 presents, frame p50 4885.1 / p90 7341.3 / p99 7341.3 / max 7341.3 ms, GPU busy 186.3 ms per present
    After: seconds 150:30 from present 40: 6 presents, frame p50 5074.1 / p90 5685.3 / p99 5685.3 / max 5685.3 ms, GPU busy 178.7 ms per present

    Resources.Complete 5.29 vs 5.14 ms per dispatch: no measurable change in that title, where the per-dispatch cost is the copy and the WriteChanged compare that this PR keeps. Traces (SHA-256 4412bd6c74fc8493e765d3d33b970a6b947ef900e09e6a38384d0ebc4f659c25).

Supplemental exact-head qualification — 2026-10-31

Merged main 602c0e417ca11f53de54ffe7b3253e95cb93c0d4 into previous head 0ae75877c9cb6238c59a6894f527cfe3221b42ee, retaining the complete original history. New public head: e21b872338378862bd71db9b3d22de26b8a7dcea.

The sole conflict was adjacent includes in Recorder.cpp; both main's DepthSurface.hpp and this PR's ReferenceStorage.hpp remain. The topic's added/removed lines are identical to its patch against 08a10d225306; main's newer behavior, fixtures, debt and submodule pins remain. Conventions and whitespace checks pass. Fresh main 85cdddc1b0e89fe66744f437513ccfdcb16f72f6 changes no AGC/shader paths after the tested pin, and its merge preview is clean.

Paired focused gate, Release with SPIRV-Tools ON, AMD Radeon RX 6650 XT / RADV Mesa 26.2.6, Linux 7.2.11-arch1-1. Same selected groups as the earlier focused gate; one execution per group:

Arm Result Actual Khronos layer insertions VUIDs Skips
main 602c0e417ca 16/16 passed 4 0 0
change e21b8723383 18/18 passed 4 0 0

The change adds agc_reference_storage and agc_heap_mirror_reference_size. Both arms used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and verbose CTest. Neither log reports the requested layer missing. The physical groups are agc_host_import_unmap, agc_host_import_retirement, agc_sparse_run_import and agc_sparse_run_import_copied; the remaining groups use CPU/mock Vulkan. The complete build/test harnesses ran through FIFO tickets1925/1926 under the explicitly title-free infrastructure reservation PPSA00004, now released.

Qualification detail: both CTest commands exited0 and their JUnit files report every selected group passed. The wrapper then exited1 because its postprocessor incorrectly required physical-layer insertion in CPU/mock agc_driver_graphics. The original failed wrapper receipts are retained. A separate audit (audit-raw.py, paired-raw-audit.json) validates the unchanged raw logs/JUnit against the actual four physical groups; no source or test behavior was changed, and no rerun is claimed.

This maintenance adds no title capture or performance/RSS claim. The earlier matched capture remains inconclusive (comment6524722530). Existing external NVIDIA/Windows and older AMD evidence remains tied to its original pins and scope.

Evidence: immutable source and paired GPU receipts (SHA-256 5d3548a127cb5d60199c18cff61e1d7df947fa5923d79a73f33dc116311f01e3, download verified).

AI-assisted: yes.

Supplemental qualification (2026-11-01)

Merged current main 93dbd0f82aea684e95f15f06e7d42c0064af18cf into previous head e21b872338378862bd71db9b3d22de26b8a7dcea. New public head: de5afa814417a3123cb5f5388ae982bda52477ce.

The conflicts were main's AGC CMake test split, the heap-mirror sweep signature and adjacent debt entries. Kept main's sweepMirrors(neededBytes, protectAddress) behavior and the PR's ReferenceStorage::Shared().ReleaseIdle() poll; moved the PR's target/test registrations into the corresponding new CMake fragments. Kept main's updated host-import budget entry and this PR's storage-limit debt. All nonblank topic added/removed lines are identical to the previous topic patch; complete original history and main's gitlinks are retained. Conventions and whitespace pass.

Paired focused Release gates, SPIRV-Tools ON, AMD Radeon RX 6650 XT / RADV Mesa26.2.6, Linux7.2.11-arch1-1, one execution per group:

Arm Focused groups Actual Khronos insertions VUIDs Skips
main 93dbd0f82aea 16/16 pass 4 0 0
PR de5afa814417 18/18 pass 4 0 0

Both ran verbose CTest with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and neither reports the requested layer missing. Four host-import/sparse-run groups execute on the physical GPU; the other groups use CPU/mock Vulkan. The PR adds the reference-storage and reference-size regressions. Whole isolated build/test harnesses ran through the title-free PPSA00004 infrastructure reservation/FIFO (main2487, change2489), with service-owned PTYs; both wrappers and CTest exited0. A prior candidate ticket2486 was cancelled while queued, before execution, to remove a blank EOF in the new fragment; that receipt is retained.

No new title capture, FPS, allocation or RSS claim. The previously matched title capture remains inconclusive (comment6524722530); historical Windows/NVIDIA/AMD reports retain their own pins/scopes.

Evidence: frozen source and qualification receipts (SHA-256 44a57b5d68d03b34fa53d61a4e20e2c54316d4ff607c86c66e0f99cf14723ae8, downloaded bytes and internal manifest verified).
AI-assisted: yes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Arch Linux 7.2.9-arch1-1; AMD Radeon RX 6700 XT, Windows 11 Enterprise 10.0.22621, AMD 32.0.21045.16010; NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Ubuntu 26.04.1 LTS (external exact-head report below).; AMD Radeon RX 6650 XT, RADV Mesa 26.2.6, Linux 7.2.11-arch1-1 (current paired focused tests)
  • AI-assisted: yes

Contributor-reported attribution observation: @milescoviello measured Borderlands 4 PPSA01494 on RTX 4070 Ti / NVIDIA 615.71.09, Linux, warm shader cache, 600 s, with local phase counters. Their candidate is main cbee224804 plus this head f7aec2a966 and #9858, so this is a mixed integration. The after-region upload phase averaged about 71 ms on control versus 27 ms on candidate; total slow-upload counts and other phase costs differed. This supports investigating heap-reference/flush cost, but single runs with an extra PR do not isolate this PR's frame-time effect or establish an FPS gain. No new local title run is claimed. Original report and full limits.

External NVIDIA validation (2026-10-30)

TechLevelZero’s report tested exact head 0ae75877c9cb6238c59a6894f527cfe3221b42ee merged onto main 98ddd9c: Release with SPIRV-Tools enabled built successfully; 2,367 tests passed, four failed (all already failing or unstable on main), and 41 skipped, from 2,412 selected. The report records 905 GPU tests with no new validation IDs; four existing IDs remain. agc_heap_mirror_reference_size and agc_reference_storage were validated without a matching main validation pass, and the job-manager capacity test needed a retry. This is attributed external evidence, not a new local run. Hardware: NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329; Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, Ubuntu 24.04 container.

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8963 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp L6
PR 13858 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp L6

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 1896 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 7048 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7256 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7410 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7457 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7464 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
docs/dev/debt/libSceAgcDriver.md
PR 7689 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7978 docs/dev/debt/libSceAgcDriver.md
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 8707 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 9020 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9248 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9335 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9432 docs/dev/debt/libSceAgcDriver.md
PR 9489 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9852 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 9884 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9915 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10025 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10069 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10233 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 10757 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10920 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 11351 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 11551 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12120 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12323 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12324 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13262 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 14212 docs/dev/debt/libSceAgcDriver.md

@JJenkx

JJenkx commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

A matched-seed capture pair on a real title. It does not show a measurable gain from this change, so the PR stays in draft.

Setup

Summary lines

  • without: seconds 290:120 from present 461: 88 presents, frame p50 1112.6 / p90 2018.2 / p99 4388.6 / max 4388.6 ms, GPU busy 635.5 ms per present
  • with: seconds 290:120 from present 442: 90 presents, frame p50 1042.2 / p90 2157.3 / p99 5609.5 / max 5609.5 ms, GPU busy 453.3 ms per present

tools/performance_compare.py, candidate minus baseline:

  • mean frame -3.1 %, p50 -6.3 %, p90 +6.9 %, p99 +27.8 %;
  • Driver.Dispatch +0.1 %, Driver.Packet -3.6 %.

Reading

  • The windows start at different presents (461 and 442), and one pair has no repeat, so these differences are within run-to-run variance.
  • The GPU busy drop is not attributable to a change in CPU-side reference buffers.
  • This title's frame time is dominated by GPU-side storage image churn and by CPU copies of a large sparse buffer, not by the allocations this PR removes.
  • Both captures report dropped trace events.

So: no regression and no demonstrated improvement on this title. The PR needs a capture from a title where heap-mirror reference allocation shows up in the profile before it can leave draft.

@JJenkx

JJenkx commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Third title, with a matched comparison: Code Violet (PPSA26528) on Linux/RADV. Shader-resource time is about 14% lower with this PR on the menu scene.

Setup

  • Linux 7.2.9, Ryzen 9 7950X, RX 6650 XT, RADV (Mesa 26.2.4); PPSA26528 01.000.028.
  • This is an integration-relative comparison, not plain main. Plain main cannot render this title on RADV (Code Violet (PPSA26528) #6256). Both sides are main a6dcea9 + feat(libSceAgcDriver): import scattered direct memory as a dma-buf run list and probe its coherence #4449 (with a local descriptor guard) + fix(agc): keep the write-back ready barrier while hole copies are pending #8908: control 4e68e5f738, and control + this PR (head 317d528, clean merge) 4b55032e92.
  • One persistent runtime for every run, with no per-run restore of shader-cache or save seeds (corrected; see my follow-up below). The AnyPS5 shader cache (12,796 files, ~5.0 GB, warm from earlier runs) had no file written during this batch. The Mesa cache and the title's save state were not reset or checked. 240 s per run with Cross at 100, 140 and 170 s, and APS5_TRACE_SECONDS=200:30. Every trace reports dirty false and dropped false. Screenshots at 230 s show the same difficulty/start menu in all four runs.
  • Run order: control, PR, PR, control. The first second-control run segfaulted during startup before the trace window (the title's occasional startup crash, seen on both sides before), so I replaced it with one more control run.

Why this title. A DWARF profile of the control at 200–220 s puts ShaderResources::Complete at 52% of process samples (inclusive). GuestBufferMemory::takeHeapReferences accounts for 25%, mostly memcpy, plus do_anonymous_page at 12% and page zeroing at 5%. That matches the per-build allocation this PR removes.

Run presents frame p50 / p90 / p99 ms GPU busy ms/present Resources.Complete ms per frame (digest's largest-slices line)
control 12 2836.5 / 4137.9 / 4503.1 754.6 1944.5
PR 14 2304.5 / 2712.7 / 2840.4 765.9 1655.8
PR 14 2457.4 / 2631.1 / 2769.9 826.4 1682.2
control 12 2885.0 / 4282.5 / 4293.5 746.5 1950.0
  • Resources.Complete drops from about 1945–1950 to about 1656–1682 ms per frame, and frame p90 from about 4.1–4.3 s to 2.6–2.7 s. The control pair and the PR pair are each tight.
  • This menu is still well under 1 FPS, held up by the rest of ShaderResources::Complete. So this is a smaller per-frame CPU cost on one scene, not a playable-rate claim.

AI-assisted: yes (Claude Code); results above were run on this machine.

@JJenkx

JJenkx commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Draft status, per the current readiness rule: this stays a draft for one specific evidence blocker, not for queue reasons.

It is a perf change, and no capture so far supports a speed claim:

  • Echoes of the End (PPSA25636): one matched-seed pair, posted above. It shows no measurable difference.
  • Code Violet (PPSA26528): four runs in the batch posted above, with the setup corrected in this comment. Every arm ran in one persistent runtime. The shader-cache and save seeds were not restored before each run, and the Mesa shader cache and the title's save state were neither reset nor checked. These four runs are observations only; they do not meet the matched-seed performance gate, so this PR makes no claim from them.

It becomes ready once a present-matched pair, from a title whose profile shows heap mirror reference allocation (takeHeapReferences), shows a measurable gain. Each arm of that pair needs the shader-cache, Mesa-cache and save seeds restored before it runs. If none turns up, I'll close the PR rather than keep it parked.

@JJenkx

JJenkx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Correction to my Code Violet comment above: its setup said the runs used "identical shader-cache and save seeds". That was wrong. I have edited the comment.

  • The Code Violet batch ran every arm in one persistent runtime and did not restore shader-cache or save seeds before each run. (My Lodoss harness does restore them; I carried that wording over.)
  • What I can show: the AnyPS5 shader cache, warm from earlier runs, had no file written during this batch (12,796 files, ~5.0 GB).
  • Not reset or checked: the Mesa shader cache and the title's save state.

The measured numbers are unchanged. The Resources.Complete figures are from tools/trace_digest.py's largest-slices line, which differs by a few ms per frame from a per-frame reduction of the same traces.

AI-assisted: yes (Claude Code); results above were run on this machine.

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Protocol note on my measurement above (comment 6332826974): it does not meet the performance-report protocol's "do not redirect the log" rule. The game's stdout and stderr were redirected to game.log by the run wrapper. The results stay as diagnostic observations, but I am withdrawing any claim of measured speed impact or direction from them until a terminal-attached rerun. The counts, logs and traces themselves are unaffected.

AI-assisted: yes (Claude Code)

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Controlled AMD/Linux run on Code Violet (PPSA26528). It replaces my earlier, unconstrained Code Violet numbers above, which remain observations only.

Scope: integration-relative, not main. On RADV, plain main does not render this title (#6256), so both sides carry the PRs it needs:

Protocol

  • Machine: Ryzen 9 7950X, RX 6650 XT 8 GiB, Linux 7.2.9, mesa/vulkan-radeon 26.2.4-1, no VK_* layer variables, on-disk shader cache enabled.
  • Seeds restored before every arm and hash-checked: the AnyPS5 shader cache (17,054 files, 6.32 GB), the Mesa cache (1,891 files) and the title's writable download0; no _sd. The seeds came from one warm-up run of the control. Both caches were pointed at per-arm copies through ANYPS5_SHADER_CACHE_DIR and MESA_SHADER_CACHE_DIR.
  • Each arm ran in a terminal; the game's stdout/stderr were that terminal (asserted isatty), not redirected to a file.
  • 300 s per arm, no input; scene = title screen. APS5_TRACE_SECONDS=240:30, APS5_TRACE_EVENTS=4194304. The game window was set once to 1024x576 and checked for later size changes; there were none.
  • Order: control, PR, PR, control, PR, control, control, PR. Every arm's screenshots at 235 s and 270 s show the title with START. All 8 traces report dirty false, dropped false and 3840x2160.
arm build presents frame p50 / p90 ms GPU busy ms/present Resources.Complete ms/frame Driver.Packet.memory_wait ms/frame
0 control 10 3992 / 5427 745 2417 1878
1 PR 15 1757 / 2985 683 1526 1302
2 PR 17 1900 / 2236 675 1283 1254
3 control 11 2962 / 4728 656 2506 1552
4 PR 12 2408 / 3490 684 1985 1505
5 control 12 3310 / 4205 632 2038 1379
6 control 11 2036 / 4246 811 2214 1452
7 PR 15 2022 / 2605 718 1579 1308
  • Resources.Complete: control 2038–2506 vs PR 1283–1985 ms per frame, no overlap; medians 2316 vs 1552.
  • Frame p90: control 4205–5427 vs PR 2236–3490 ms, no overlap.
  • Presents in the 30 s window: control 10–12 vs PR 12–17.
  • Frame p50 overlaps (control 2036–3992, PR 1757–2408), so I don't claim a median frame-time change.
  • The title is still well under 1 FPS on both sides.

Resources.Complete is read from tools/trace_digest.py's largest-slices line.

AI-assisted: yes (Claude Code); results above were run on this machine.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@JJenkx
JJenkx force-pushed the perf/agc-heap-reference-reuse branch from 317d528 to 404aab2 Compare October 23, 2026 14:05
@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main 9af7d8d810 (head 404aab2817). The rebase was clean; the diff is unchanged (9 files).

Focused gate on the rebase: one build directory and the same command for every arm. Command: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest -V -j1 -R '^(agc_driver_graphics|agc_sparse_.*|agc_heap_mirror_.*|agc_host_import.*|agc_reference_storage)$'. Machine: Linux 7.2.9, RX 6650 XT, RADV (Mesa 26.2.4).

arm result validation layer inserted VUIDs
main 9af7d8d810 15/15 (this PR's two tests do not exist there) 4 tests 0
this PR with GuestBufferMemory.cpp/.hpp taken from main (reference storage built and tested, not used by the mirror) 17/17 4 tests 0
this PR 404aab2817 17/17 4 tests 0

Every arm prints only the two existing Windows guest-arena skips. The middle arm passing is expected: reuse changes no observable bytes. agc_reference_storage and agc_heap_mirror_reference_size check that reused storage is correct (sizes and contents across reuse); they do not detect whether reuse happens. Logs, with local paths redacted: https://github.com/JJenkx/AnyPS5/releases/tag/pr8874-evidence

Performance evidence is @claude-research's controlled Code Violet run above (comment 6359360025): integration-relative, 8 alternating arms, with the seeds restored and hash-checked per arm. Resources.Complete and frame p90 do not overlap between control and PR; frame p50 does, and no p50 change is claimed. The PR stays a draft only until that run's summary JSON lines are added to the description, as the perf template requires.

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

The official aps5-summary.jsonl lines of my controlled Code Violet run (comment 6359360025), one per arm in run order: control, PR, PR, control, PR, control, control, PR.

Pins, exactly as measured (integration-relative, not main):

These lines measure 317d528af7, not the current head 404aab2817. Per the rebase note above, the current head is a clean rebase of the same 9-file diff onto main 9af7d8d810; I have not re-measured it.

Each arm ran terminal-attached: isatty was checked, and nothing was redirected to a file. Seeds were restored and hash-checked, the window was set once to 1024x576 with no later changes, and the scene was the title screen with START. The env fields are redacted by the tool. No other APS5_TRACE_* or APS5_PROFILE_* switch was set.

{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 156, "ms": 30640.15}, "presents": 10, "frame_ms": {"p50": 3992.296, "p90": 5427.294, "p99": 5427.294, "max": 5427.294}, "gpu_busy_ms_per_present": 744.568, "worker_busy_pct": {"queue worker 0x0": 99.936, "queue worker 0x20": 98.571}, "top_phases_ms_per_frame": {"Driver.Packet": 6081.167, "Driver.Packet.dispatch": 3315.598, "Driver.Dispatch": 3314.242, "Vulkan.Dispatch": 2437.039, "Vulkan.Dispatch.shader_resources": 2427.172, "Resources.Complete": 2421.096, "Driver.Packet.memory_wait": 1878.356, "GpuMutex.wait.hook": 1015.725}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-2886059.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 181, "ms": 30888.713}, "presents": 15, "frame_ms": {"p50": 1757.209, "p90": 2984.839, "p99": 3937.0, "max": 3937.0}, "gpu_busy_ms_per_present": 682.819, "worker_busy_pct": {"queue worker 0x0": 99.922, "queue worker 0x20": 99.501}, "top_phases_ms_per_frame": {"Driver.Packet": 4106.071, "Driver.Packet.dispatch": 2124.983, "Driver.Dispatch": 2121.846, "Vulkan.Dispatch": 1540.429, "Vulkan.Dispatch.shader_resources": 1532.391, "Resources.Complete": 1529.579, "Driver.Packet.memory_wait": 1302.325, "GpuMutex.wait.hook": 654.578}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3013032.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 186, "ms": 31288.173}, "presents": 17, "frame_ms": {"p50": 1900.036, "p90": 2236.123, "p99": 2340.754, "max": 2340.754}, "gpu_busy_ms_per_present": 674.571, "worker_busy_pct": {"queue worker 0x0": 99.905, "queue worker 0x20": 98.584}, "top_phases_ms_per_frame": {"Driver.Packet": 3651.607, "Driver.Packet.dispatch": 1825.097, "Driver.Dispatch": 1824.09, "Vulkan.Dispatch": 1312.238, "Vulkan.Dispatch.shader_resources": 1303.662, "Resources.Complete": 1286.777, "Driver.Packet.memory_wait": 1254.13, "GpuMutex.wait.hook": 680.343}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3133785.json.gz"}
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 161, "ms": 34131.142}, "presents": 11, "frame_ms": {"p50": 2962.007, "p90": 4727.645, "p99": 5025.638, "max": 5025.638}, "gpu_busy_ms_per_present": 656.36, "worker_busy_pct": {"queue worker 0x0": 99.943, "queue worker 0x20": 99.06}, "top_phases_ms_per_frame": {"Driver.Packet": 6174.132, "Driver.Packet.dispatch": 3751.391, "Driver.Dispatch": 3750.419, "Vulkan.Dispatch": 2526.365, "Vulkan.Dispatch.shader_resources": 2517.92, "Resources.Complete": 2509.58, "Driver.Packet.memory_wait": 1551.969, "GpuMutex.wait.dispatch": 997.572}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-3247948.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 179, "ms": 30629.534}, "presents": 12, "frame_ms": {"p50": 2407.655, "p90": 3490.165, "p99": 4600.331, "max": 4600.331}, "gpu_busy_ms_per_present": 684.304, "worker_busy_pct": {"queue worker 0x0": 99.934, "queue worker 0x20": 99.217}, "top_phases_ms_per_frame": {"Driver.Packet": 5081.035, "Driver.Packet.dispatch": 2921.691, "Driver.Dispatch": 2920.738, "Vulkan.Dispatch": 2002.647, "Vulkan.Dispatch.shader_resources": 1994.514, "Resources.Complete": 1988.964, "Driver.Packet.memory_wait": 1505.24, "GpuMutex.wait.hook": 722.85}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3364695.json.gz"}
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 154, "ms": 31370.837}, "presents": 12, "frame_ms": {"p50": 3309.874, "p90": 4205.095, "p99": 4248.044, "max": 4248.044}, "gpu_busy_ms_per_present": 631.648, "worker_busy_pct": {"queue worker 0x0": 99.935, "queue worker 0x20": 98.603}, "top_phases_ms_per_frame": {"Driver.Packet": 5189.17, "Driver.Packet.dispatch": 3007.904, "Driver.Dispatch": 3006.72, "Vulkan.Dispatch": 2084.577, "Vulkan.Dispatch.shader_resources": 2075.89, "Resources.Complete": 2042.26, "Driver.Packet.memory_wait": 1379.514, "GpuMutex.wait.hook": 804.84}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-3481320.json.gz"}
{"commit": "ddeeddfff4ca", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 159, "ms": 30481.98}, "presents": 11, "frame_ms": {"p50": 2036.421, "p90": 4246.281, "p99": 4663.05, "max": 4663.05}, "gpu_busy_ms_per_present": 810.726, "worker_busy_pct": {"queue worker 0x0": 99.94, "queue worker 0x20": 98.922}, "top_phases_ms_per_frame": {"Driver.Packet": 5510.018, "Driver.Packet.dispatch": 3208.028, "Driver.Dispatch": 3206.827, "Vulkan.Dispatch": 2244.751, "Vulkan.Dispatch.shader_resources": 2236.138, "Resources.Complete": 2217.781, "Driver.Packet.memory_wait": 1452.236, "GpuMutex.wait.hook": 829.56}, "trace_dropped": false, "trace": "aps5-trace-ddeeddfff4ca-3599341.json.gz"}
{"commit": "6208617c95f1", "dirty": false, "env": {"APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_EVENTS": "4194304", "APS5_TRACE_SECONDS": "240:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "cpu": "AMD Ryzen 9 7950X 16-Core Processor", "cpu_threads": 32, "memory_mib": 127901, "title_id": "PPSA26528", "title": "Code Violet", "content_version": "01.000.028", "resolution": "3840x2160", "window": {"spec": "seconds 240:30", "first_present": 178, "ms": 32057.776}, "presents": 15, "frame_ms": {"p50": 2021.931, "p90": 2604.798, "p99": 4700.152, "max": 4700.152}, "gpu_busy_ms_per_present": 718.208, "worker_busy_pct": {"queue worker 0x0": 99.923, "queue worker 0x20": 98.767}, "top_phases_ms_per_frame": {"Driver.Packet": 4245.321, "Driver.Packet.dispatch": 2323.912, "Driver.Dispatch": 2322.844, "Vulkan.Dispatch": 1614.889, "Vulkan.Dispatch.shader_resources": 1607.154, "Resources.Complete": 1582.581, "Driver.Packet.memory_wait": 1307.953, "GpuMutex.wait.hook": 696.814}, "trace_dropped": false, "trace": "aps5-trace-6208617c95f1-3716801.json.gz"}

AI-assisted: yes (Claude Code); results above were run on this machine.

@JJenkx
JJenkx force-pushed the perf/agc-heap-reference-reuse branch from 404aab2 to 082f3ec Compare October 23, 2026 17:55
@JJenkx
JJenkx marked this pull request as ready for review October 23, 2026 17:55
@github-actions github-actions Bot removed perf numbers missing perf pull request without a before and after summary line needs rebase Conflicts with main, rebase needed labels Oct 23, 2026
@adriadam10 adriadam10 self-assigned this Oct 23, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the measurements; the reuse itself reads correct (Take/Return don't allocate, the reference keeps its own size, the new tests pin that). One blocker:

  • core/libs/prx/libSceAgcDriver/Graphics/src/ReferenceStorage.cpp:62: Shared() is a process-lifetime store that keeps up to 8 buffers / 2 GiB idle on every driver and GPU, and nothing frees it other than newer Return calls evicting older ones. After a heavy scene ends, up to 2 GiB of RSS stays resident indefinitely. The PR body gives the bound but not what releases it, and there is no peak/steady RSS before/after. Please add:
    • peak and steady-state RSS on main vs this PR for the same scene (the Code Violet runs you already have are enough; /proc/<pid>/status VmHWM/VmRSS sampled in both arms);
    • a release path (e.g. drop the idle buffers when no GuestBufferMemory holds references / after a period without a take, or at device teardown), or a justification for 2 GiB based on those numbers. If the cap is only needed for the largest scenes, a smaller default may keep most of the gain.

Once that is in, the rest looks good to me.

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@adriadam10 RSS for the review, measured on the same Code Violet scene and pins as my controlled run (6359360025). It was a new run: the earlier runs did not sample RSS.

Pins: integration-relative, because plain main does not render this title on RADV (#6256).

These are not the current head 404aab2817, whose diff is the same, or any later release-path version.

Protocol: as in 6359360025: seeds restored and hash-checked before each run, terminal-attached with no redirected output, no input, window set once to 1024x576 with no later changes, 300 s runs, APS5_TRACE_SECONDS=240:30. VmHWM and VmRSS were read from /proc/<pid>/status every 2 s in all arms. Order: control, PR, PR, control.

arm peak (VmHWM) MiB steady VmRSS, 240–300 s, mean (min–max) MiB presents in the trace window
control 11,533 10,876 (10,533–11,307) 13
PR 11,991 11,128 (11,008–11,495) 17
PR 11,705 11,236 (11,050–11,465) 15
control 11,355 10,654 (10,363–11,144) 12
  • Peak: control 11,355–11,533 vs PR 11,705–11,991 MiB, about +400 MiB (means 11,444 vs 11,848).
  • Steady: control means 10,654–10,876 vs PR 11,128–11,236 MiB, about +420 MiB (10,765 vs 11,182).
  • So in this heavy scene the store holds roughly 0.4 GiB more resident than the control, well below its 2 GiB bound.

Limits. This is a single scene for the whole run, so it measures how much the pool holds while a heavy scene is live. It does not show whether that memory is released after the scene ends, which is your concern; the release path is the author's to add. Two runs per side; RSS includes everything else the process holds (about 10.7 GiB on the control).

AI-assisted: yes (Claude Code); results above were run on this machine.

@JJenkx
JJenkx force-pushed the perf/agc-heap-reference-reuse branch from 082f3ec to 7a6f608 Compare October 23, 2026 20:27
@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@adriadam10 thanks. Release path added in 7a6f60850a (perf(agc): free heap mirror reference buffers idle for two seconds), rebased on main 8cc82c85bf.

The change:

  • Each slot records when its buffer was returned. A buffer idle for ReferenceStorage::IdleLimit (2 s) is freed:
    • at the next Take or Return;
    • at every heap mirror sweep, which runs at the end of each address-based build;
    • at every present, through Recorder::CountPresent.
  • The store therefore empties about 2 s after heap mirrors stop being used, including when the title stops building, instead of holding up to 2 GiB for the life of the process.
  • It is age-based, not a one-time Clear(). A late Return only refills a slot that ages out again, so no owner needs draining and no epoch is needed.
  • Freed buffers are moved out under the mutex and destroyed after it is released, as Return already did for evictions. Take and Return still do not allocate; the existing NoAllocationOnReturnOrTake test passes.
  • Take, Return and the new ReleaseIdle take an optional time point, for the tests.

Tests: new IdleBuffersReleased in agc_reference_storage covers:

  • survival 1 ms before the limit and release at the limit;
  • per-buffer ages;
  • Take and Return dropping stale buffers themselves;
  • a stale buffer never being handed out.

Docs: a debt entry records both unmeasured limits (8 slots / 2 GiB, 2 s).

Exact-head gate (7a6f60850a), same command as in the description, validation layer loaded:

arm result layer inserted VUIDs
main 8cc82c85bf 16/16 4 tests 0
this PR, GuestBufferMemory from main 18/18 4 tests 0
this PR 18/18 4 tests 0

Logs: vvl8874-7a6f-*.log in https://github.com/JJenkx/AnyPS5/releases/tag/pr8874-evidence

RSS: the peak and steady VmHWM/VmRSS you asked for are being measured on the same controlled Code Violet setup as the performance runs (seeded, terminal-attached, sampled every 2 s): control vs the process-lifetime pool first, then this release-path head. I will post the numbers here when both are in, and keep this PR a draft until then.

@JJenkx
JJenkx marked this pull request as draft October 23, 2026 20:27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJenkx

JJenkx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 refreshed on current main as requested.

Head: 9f226879bc5, a merge of main 899ae3d1ad3 into the previous head f31fdef05ba. The merge was clean and the change is unchanged. main has since moved to b0465557fdf. None of those 84 commits touch GuestBufferMemory.cpp, tests/Graphics.cpp, tests/BdaTests.hpp or the AGC CMakeLists.txt, and git merge-tree against it is clean. Conventions pass.

Focused gate on main 899ae3d1ad3 and on this head. Same machine and GPU: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Linux 7.2.9-arch1-1.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
  ctest -V -j1 -R '^(agc_driver_graphics|agc_sparse_.*|agc_heap_mirror_.*|agc_host_import.*|agc_reference_storage)$'
main 899ae3d1ad3 this PR 9f226879bc5
Result 16/16 passed 18/18 passed
Tests added by this PR agc_reference_storage, agc_heap_mirror_reference_size
VUID- 0 0
Validation layer inserted, never missing inserted, never missing

Logs: https://github.com/JJenkx/AnyPS5/releases/tag/pr8874-current-main-gate-20261029

Still pending: the current same-title main/change capture and the allocation/RSS measurement you asked for. Echoes needs four open PRs to boot on main (#4449, #8089, #11873, #6867). Both sides therefore run on main 899ae3d1ad3 plus those four. The capture runs are:

  • two interleaved 1800 s runs per side;
  • APS5_TRACE_SECONDS=1500:240 and no profile switches;
  • VmRSS/VmHWM sampled every 5 s from /proc.

They are queued on the shared GPU runner. Until they finish, this PR makes no new speed or RSS claim, and the perf evidence stays open.

AI-assisted: yes (Claude Code).

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 9f22687 merged onto main bb04a4f · tested 2026-10-29 20:48 UTC · 32 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,312 passed · 6 failed (0 new, 5 also fail on main, 1 unstable on main) · 40 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,358 of 2,918 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (897 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 4 of the last 6 main runs
Failing on main too (5, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_job_manager_compute_capacity: Failed in the parallel run; also passed only on retry in 49 other runs in the last 7 days
Validated but not compared (2, not in the main baseline's validation pass)
agc_heap_mirror_reference_size
agc_reference_storage
Validation IDs already present on main (4 IDs in 433 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (433 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alpha_to_coverage, agc_driver_array_layer_target_cpu, agc_driver_bc_block_copy, and 425 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (40)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_labels: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not
Reproduce
git fetch origin 9f226879bc5e9bd488022746b47dbaf714ec05d5 bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff 9f226879bc5e9bd488022746b47dbaf714ec05d5
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, changes requested

The current head still lacks a performance report captured against current main, and the latest GPU run uses an older main snapshot.

What I ran

Reviewed head 9f226879bc5e9bd488022746b47dbaf714ec05d5; PR base is 899ae3d1ad32ccea94dc24e66fdc948ce8a88171. I compared it with current main fc9240dbc5dc89a6b17a739703e00d26318c7716; the merge preview is clean. No local build or tests were run.

git merge-tree --write-tree refs/remotes/upstream/main refs/review/pr-8874-head
git diff --check refs/remotes/upstream/main...refs/review/pr-8874-head

Results

Check Result
Merge preview onto current main Clean
Diff whitespace check Passed (no output)
NVIDIA GPU workflow CI report for this head, merged onto bb04a4f, reports 2,312 passed, 6 failures (0 new; 5 also on main and 1 unstable on main), and no new validation IDs
Local build/tests Not run
Unedited local command output
merge-tree: eb5442ba5bc743df10ea471d4a572047a62e721d
diff-check: no output; exit status 0

Findings

Blocking

  • The PR remains labeled perf. The newest author report says it contains no new title, RSS, or speed measurement; the latest GPU workflow is a correctness run, not a matched performance capture. The existing performance evidence therefore does not establish this change's performance against current main.
  • Current main has advanced from the author's focused test base 899ae3d and the GPU workflow base bb04a4f. The current-main diff overlaps this PR in core/libs/prx/libSceAgcDriver/CMakeLists.txt, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, and docs/dev/debt/libSceAgcDriver.md. The clean merge preview does not update the reported test results or performance evidence to that merged tree.

Non-blocking

  • The focused AMD report on head 9f22687 reports 18/18 tests passing versus 16/16 on its 899ae3d baseline, with zero validation IDs. This is useful test evidence, but it does not cover current main or satisfy the performance report requirement.

Not verified

I did not build locally, rerun the focused tests, or run a performance capture. The AMD focused results and NVIDIA CI results above are contributor/CI-reported, not locally reproduced.

To get this to a good state

Please refresh onto current main, rerun the focused comparison on the resulting exact head, and add the required matched main/change performance captures for the same title, scene, and machine, including both aps5-summary.jsonl lines, traces, and tools/trace_digest.py output. I will re-run the same source checks and review the new exact head.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/BdaTests.hpp
#	docs/dev/debt/libSceAgcDriver.md
@JJenkx

JJenkx commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main (08a10d22530) into the branch: new head 0ae75877c9c (was 9f226879bc5).

  • Conflicts: tests/BdaTests.hpp (this PR's RunHeapMirrorReferenceSizeTests declaration next to main's new RunAddressCopyCapMirrorTests / RunUnwatchedMirrorImportTests, all kept) and docs/dev/debt/libSceAgcDriver.md (main's updated host-import entry taken, this PR's reference-storage entry kept). No code conflict.
  • Main's GuestBufferMemory.cpp changes since the last merge (8896536f319, c2800593290) concern import eviction for heaps a mirror can replace; they do not touch the heap reference take/release paths this PR changes.
  • tools/check_conventions.py --base origin/main: passes.
  • Focused tests under the Khronos validation layer (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, layer inserted in every test process), RX 6650 XT, RADV Mesa 26.2.4, Linux 7.2.9, ctest -R '^(agc_driver_graphics|agc_sparse_.*|agc_heap_mirror_.*|agc_host_import.*|agc_reference_storage)$':
    • main 08a10d22530: 16/16 passed, 0 VUIDs.
    • this branch 0ae75877c9c: 18/18 passed (adds agc_reference_storage and the reference-size checks), 0 VUIDs.

No new performance claim with this merge.

🤖 Generated with Claude Code

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, changes requested

The new integration report adds useful GPU correctness evidence, but it does not yet provide the required performance comparison or validation on the latest main snapshot.

What I ran

Reviewed head 0ae75877c9cb6238c59a6894f527cfe3221b42ee, integrated with main at 08a10d225306ad102b57408e2ef7566bcfb829b2; current main is 5ecef095b61e7a406b279c97896f3a8a6fbd6353. Current-main merge preview is clean (tree 58ac36f0761e2e9bbbfcc4dd56e3858bcb0187b5). Since the integration point, main changed five commits; the only shared changed paths are core/libs/prx/libSceAgcDriver/tests/Graphics.cpp and docs/dev/debt/libSceAgcDriver.md.

git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-8874
git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-8874
git diff --name-only 08a10d225306ad102b57408e2ef7566bcfb829b2..refs/remotes/upstream/main

Results

Check Result
Merge preview Clean
Diff check Passed; no output
Hosted conventions and Windows Passed
Focused AMD tests Author reports 18/18 on this head and 16/16 on main at 08a10d2; not independently run
Performance evidence No new same-title, same-scene, same-machine main/change capture pair is present

Findings

Blocking

  • The PR remains labeled perf, while the new report is a correctness run and supplies no matched performance captures or the required report artifacts. This leaves the stated performance result unverified.
  • The new focused tests use main at 08a10d2. Current main has since changed the shared graphics test file; the reported pair therefore does not cover the latest test tree.

Not verified

I did not run a local build, GPU tests, or a performance capture.

To get this to a good state

Please attach the required matched main/change performance captures for the same title, scene, and machine, including both aps5-summary.jsonl lines, traces, and tools/trace_digest.py output. Please also rerun the focused main/change tests using current main 5ecef09 (or the corresponding exact merge tree). I’ll rerun the same source checks on the new head.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 0ae7587 merged onto main 98ddd9c · tested 2026-10-30 13:07 UTC · 22 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,367 passed · 4 failed (0 new, 2 also fail on main, 2 unstable on main) · 41 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,412 of 2,987 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (905 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 71.6 s, ⚠️ agc_driver_lazy_resolved_abi_switch_set 31.6 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_submit_progress: failed in 5 of the last 8 main runs
agc_submit_progress_no_timeline: failed in 6 of the last 8 main runs
Failing on main too (2, not counted against this PR)
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_job_manager_compute_capacity: Failed in the parallel run; also passed only on retry in 104 other runs in the last 7 days
Validated but not compared (2, not in the main baseline's validation pass)
agc_heap_mirror_reference_size
agc_reference_storage
Validation IDs already present on main (4 IDs in 425 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (425 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_array_layer_target_cpu, agc_driver_bda_span_reads, agc_driver_bda_span_reads_draw_pipeline, agc_driver_bitfield_mask, and 417 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (41)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or plat
Reproduce
git fetch origin 0ae75877c9cb6238c59a6894f527cfe3221b42ee 98ddd9c1792bbab016ceed5db267a93d1d61f00a
git checkout 98ddd9c1792bbab016ceed5db267a93d1d61f00a && git merge --no-ff 0ae75877c9cb6238c59a6894f527cfe3221b42ee
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@JJenkx

JJenkx commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Re-check on current main 1c6b316: tests pass, performance comparison inconclusive

This follows up the change request in review 5708046058. It covers both requests: the focused tests on current main, and a matched main/change performance capture.

1. Focused tests on current main

I merged current main 1c6b316cf762c7a8d34623907d62bc1cba2217b6 into PR head 0ae75877c9c locally as c155740007f. The merge has no conflicts and was not pushed. The PR's added and removed lines after the merge are identical to its patch at 08a10d2. Main changed GuestBufferMemory.cpp and Recorder.cpp in the meantime, but none of those changes touch the PR's lines.

Machine: Linux 7.2.9, Release, Ryzen 9 7950X, RX 6650 XT, RADV Mesa 26.2.4. Settings: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest -V -j1 -R '^(agc_driver_graphics|agc_sparse_.*|agc_heap_mirror_.*|agc_host_import.*|agc_reference_storage)$'. Run once per arm.

Arm Source Result Validation layer inserted VUIDs
main 1c6b316cf76 16/16 pass 4 0
change c155740007f 18/18 pass (adds agc_reference_storage, agc_heap_mirror_reference_size) 4 0

The layer is inserted only in the four physical-GPU groups. The other groups use CPU or mock Vulkan.

2. Matched title capture: Echoes of the End (PPSA25636, 01.012.000), same machine

Plain main does not run this title on RADV. Both arms therefore use the same private stack: main 1c6b316 plus open PRs #4449 1f7640bad24, #8089 204cbc558d1, #11873 bcaac162594 and #6867 761ef1105e7.

  • Base: 735aec0c60f.
  • Change: ae6bf50f517, which is the base plus this PR at 0ae75877c9c. Its diff from the base is exactly the PR's patch.
  • Merge resolution in the stack: three files (ShaderRegistry.cpp, GuestArena.hpp, GuestArena.cpp) had both sides adding lines in the same spot, and both sides were kept.

Run setup:

  • Four arms in alternating order (base, change, change, base). Each arm was its own FIFO launch.
  • Before every arm, the same seed was restored: title shader cache, Mesa cache and save state, manifest 6a3bbca6eb39b28b.
  • 1460 s with scripted static pad input from a save, then Continue.
  • APS5_TRACE_SECONDS=1180:100, screenshots at 1140 to 1455 s.
  • All arms ended on the timer. The kernel logged no amdgpu events, and per-process amd-evicted-vram stayed at 0 MiB.
Arm Commit Presents in window Frame p50 GPU busy per present Trace dropped Scene at 1230 s Left loading
1 base 735aec0c60fe 13 7421 ms 965 ms no loading not by 1455 s
2 change ae6bf50f5174 71 853 ms 461 ms yes in-world 1181–1230 s
3 change ae6bf50f5174 31 1874 ms 853 ms no loading 1331–1400 s
4 base 735aec0c60fe 51 901 ms 498 ms yes loading 1281–1330 s

Result: inconclusive. I make no speed claim. The trace window does not show the same scene in all arms: three arms are still loading and one is in-world. Load completion overlaps between the arms (change 1181–1230 and 1331–1400 s, base 1281–1330 s and after 1455 s), and the arm-to-arm spread is larger than any plausible effect of this change. This capture does not show a regression either.

The PR's saving is in takeHeapReferences. It avoids allocating and zero-filling reference storage for each write-back. That cost is not visible as a separate trace phase on this route.

Evidence

Pins, both diffs, gate logs, all four aps5-summary.jsonl lines, traces, tools/trace_digest.py output, reports, screenshots and memory/eviction samples. SHA-256: 9847dea6abd35ab9b1d68618b70676792da44066a7dc0e27187c2d577d822dea (downloaded copy verified).

The branch head is unchanged at 0ae75877c9c. It merges cleanly into current main, so I did not push a refresh just to update its base.

🤖 Generated with Claude Code

@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 31, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 31, 2026
@JJenkx

JJenkx commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Supplemental exact-head qualification — 2026-10-31

Merged main 602c0e417ca11f53de54ffe7b3253e95cb93c0d4 into previous head 0ae75877c9cb6238c59a6894f527cfe3221b42ee, retaining the complete original history. New public head: e21b872338378862bd71db9b3d22de26b8a7dcea.

The sole conflict was adjacent includes in Recorder.cpp; both main's DepthSurface.hpp and this PR's ReferenceStorage.hpp remain. The topic's added/removed lines are identical to its patch against 08a10d225306; main's newer behavior, fixtures, debt and submodule pins remain. Conventions and whitespace checks pass. Fresh main 85cdddc1b0e89fe66744f437513ccfdcb16f72f6 changes no AGC/shader paths after the tested pin, and its merge preview is clean.

Paired focused gate, Release with SPIRV-Tools ON, AMD Radeon RX 6650 XT / RADV Mesa 26.2.6, Linux 7.2.11-arch1-1. Same selected groups as the earlier focused gate; one execution per group:

Arm Result Actual Khronos layer insertions VUIDs Skips
main 602c0e417ca 16/16 passed 4 0 0
change e21b8723383 18/18 passed 4 0 0

The change adds agc_reference_storage and agc_heap_mirror_reference_size. Both arms used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and verbose CTest. Neither log reports the requested layer missing. The physical groups are agc_host_import_unmap, agc_host_import_retirement, agc_sparse_run_import and agc_sparse_run_import_copied; the remaining groups use CPU/mock Vulkan. The complete build/test harnesses ran through FIFO tickets1925/1926 under the explicitly title-free infrastructure reservation PPSA00004, now released.

Qualification detail: both CTest commands exited0 and their JUnit files report every selected group passed. The wrapper then exited1 because its postprocessor incorrectly required physical-layer insertion in CPU/mock agc_driver_graphics. The original failed wrapper receipts are retained. A separate audit (audit-raw.py, paired-raw-audit.json) validates the unchanged raw logs/JUnit against the actual four physical groups; no source or test behavior was changed, and no rerun is claimed.

This maintenance adds no title capture or performance/RSS claim. The earlier matched capture remains inconclusive (comment6524722530). Existing external NVIDIA/Windows and older AMD evidence remains tied to its original pins and scope.

Evidence: immutable source and paired GPU receipts (SHA-256 5d3548a127cb5d60199c18cff61e1d7df947fa5923d79a73f33dc116311f01e3, download verified).

AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head e21b872 merged onto main 73f4f7e · tested 2026-10-31 15:29 UTC · 24 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,430 passed · 5 failed (0 new, 4 also fail on main, 1 unstable on main) · 50 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,485 of 3,072 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (925 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_graphics_maps_fallback 33.4 s, ⚠️ agc_driver_graphics 32.8 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 2 of the last 10 main runs
Failing on main too (4, not counted against this PR)
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_job_manager_compute_capacity: Failed in the parallel run; also passed only on retry in 183 other runs in the last 7 days
Validated but not compared (2, not in the main baseline's validation pass)
agc_heap_mirror_reference_size
agc_reference_storage
Validation IDs already present on main (4 IDs in 426 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (426 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 418 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (50)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or pla
Reproduce
git fetch origin e21b872338378862bd71db9b3d22de26b8a7dcea 73f4f7e06e4f210a8c6570e335fd654dc0a86134
git checkout 73f4f7e06e4f210a8c6570e335fd654dc0a86134 && git merge --no-ff e21b872338378862bd71db9b3d22de26b8a7dcea
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 31, 2026
@JJenkx

JJenkx commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main 93dbd0f82aea684e95f15f06e7d42c0064af18cf into previous head e21b872338378862bd71db9b3d22de26b8a7dcea. New public head: de5afa814417a3123cb5f5388ae982bda52477ce.

The conflicts were main's AGC CMake test split, the heap-mirror sweep signature and adjacent debt entries. Kept main's sweepMirrors(neededBytes, protectAddress) behavior and the PR's ReferenceStorage::Shared().ReleaseIdle() poll; moved the PR's target/test registrations into the corresponding new CMake fragments. Kept main's updated host-import budget entry and this PR's storage-limit debt. All nonblank topic added/removed lines are identical to the previous topic patch; complete original history and main's gitlinks are retained. Conventions and whitespace pass.

Paired focused Release gates, SPIRV-Tools ON, AMD Radeon RX 6650 XT / RADV Mesa26.2.6, Linux7.2.11-arch1-1, one execution per group:

Arm Focused groups Actual Khronos insertions VUIDs Skips
main 93dbd0f82aea 16/16 pass 4 0 0
PR de5afa814417 18/18 pass 4 0 0

Both ran verbose CTest with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and neither reports the requested layer missing. Four host-import/sparse-run groups execute on the physical GPU; the other groups use CPU/mock Vulkan. The PR adds the reference-storage and reference-size regressions. Whole isolated build/test harnesses ran through the title-free PPSA00004 infrastructure reservation/FIFO (main2487, change2489), with service-owned PTYs; both wrappers and CTest exited0. A prior candidate ticket2486 was cancelled while queued, before execution, to remove a blank EOF in the new fragment; that receipt is retained.

No new title capture, FPS, allocation or RSS claim. The previously matched title capture remains inconclusive (comment6524722530); historical Windows/NVIDIA/AMD reports retain their own pins/scopes.

Evidence: frozen source and qualification receipts (SHA-256 44a57b5d68d03b34fa53d61a4e20e2c54316d4ff607c86c66e0f99cf14723ae8, downloaded bytes and internal manifest verified).
AI-assisted: yes.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head de5afa8 merged onto main 93dbd0f · tested 2026-11-02 03:00 UTC · 29 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,498 passed · 7 failed (0 new, 3 also fail on main, 4 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,550 of 3,165 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (934 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 32.6 s, ⚠️ agc_driver_graphics 30.7 s
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)
agc_driver_depth_clear_hle: VUID-vkCmdCopyBuffer-commonparent (6x)
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 10 main runs
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 7 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_heap_mirror_reference_size
agc_reference_storage
Validation IDs already present on main (5 IDs in 484 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (484 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 476 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin de5afa814417a3123cb5f5388ae982bda52477ce 93dbd0f82aea684e95f15f06e7d42c0064af18cf
git checkout 93dbd0f82aea684e95f15f06e7d42c0064af18cf && git merge --no-ff de5afa814417a3123cb5f5388ae982bda52477ce
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@oneandonlydean
oneandonlydean merged commit 00069c0 into boykopovar:main Nov 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants